﻿using System;
using System.Configuration;

namespace PS.WSSDeploy.Client
{
    internal class Config
    {
        public static int MaxReceivedMessageSize
        {
            get
            {
                string val = ConfigurationManager.AppSettings["MaxReceivedMessageSize"];
                return (string.IsNullOrEmpty(val)) ? 2147483647 : Convert.ToInt32(val);
            }
        }
        public static int MaxBufferSize
        {
            get
            {
                string val = ConfigurationManager.AppSettings["MaxBufferSize"];
                return (string.IsNullOrEmpty(val)) ? 2147483647 : Convert.ToInt32(val);
            }
        }
        public static int MaxBufferPoolSize
        {
            get
            {
                string val = ConfigurationManager.AppSettings["MaxBufferPoolSize"];
                return (string.IsNullOrEmpty(val)) ? 2147483647 : Convert.ToInt32(val);
            }
        }
        public static int ReaderQuotas_MaxArrayLength
        {
            get
            {
                string val = ConfigurationManager.AppSettings["ReaderQuotas_MaxArrayLength"];
                return (string.IsNullOrEmpty(val)) ? 50000000 : Convert.ToInt32(val);
            }
        }
    }
}
